import Cookies from 'js-cookie'
import userInfo from '@/store/modules/user'
const TokenKey = 'vue_admin_template_token'
const User = 'user'

export function getToken() {
  // return Cookies.get(TokenKey)
  return localStorage.getItem(TokenKey)
}

export function setToken(token) {
  return localStorage.setItem(TokenKey,token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function getUserName() {
  // return Cookies.get(TokenKey)
  return localStorage.getItem(User)
}
export function setUserName(name) {
  console.log("set ",name)
  return localStorage.setItem(User,name)
}
export function removeName() {
  return localStorage.removeItem(User)
}